<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <title>用户: ${this.user.fullName}</title>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>进件作业系统</li>
                    <li><g:link controller="bocUser" action="index">商户柜员管理</g:link></li>
                    <li class="active">
                        <span class="nameFormat">${this.user.fullName}</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                用户: <span class="nameFormat">${this.user.fullName}</span>
            </h2>
            <small><span class="glyphicon glyphicon-cog" aria-hidden="true"></span><span class="nameFormat">${this.user.fullName}</span> 的资料</small>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <div class="hpanel hred contact-panel">
            <div class="panel-heading">
                <sec:ifAnyGranted roles="ROLE_ADMINISTRATOR">
                    <div class="panel-tools">
                        <g:link class="btn btn-info btn-xs" action="edit1"
                                id="${this.user?.id}"><i class="fa fa-edit"></i>编辑</g:link>
                    </div>
                </sec:ifAnyGranted>
                用户基本信息
            </div>

            <div class="panel-body">
                <div class="text-muted font-bold m-b-xs ol-md-6">

                    <div class="col-md-3"><strong>EHR：${this.user?.username}</strong></div>

                    <div class="col-md-3"><strong>柜员名称：${this.user?.fullName}</strong></div>

                    <div class="col-md-3"><strong>柜员手机号：${this.user?.cellphone}</strong></div>


                    <div class="col-md-3"><strong>归属商户：${this.user?.account}</strong></div>

                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="hpanel  hblue">
            <div class="panel-heading">
                <div class="panel-tools">
                    <sec:ifAllGranted roles="ROLE_ADMINISTRATOR">
                        <g:link controller="userRole" action="create" id="${this.user.id}"
                                class="btn btn-info btn-xs">增加授权</g:link>
                    </sec:ifAllGranted>
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                </div>
                用户角色
            </div>

            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover">
                        <tbody>
                        <g:each in="${userRoleList}" var="r">
                            <tr>
                                <td>${r?.role.description}</td>
                                <td width="6%">
                                    <sec:ifAllGranted roles="ROLE_ADMINISTRATOR">
                                        <g:link action="deleteRole" params="[userId: r.user.id, roleId: r.role.id]"
                                                class="btn btn-danger btn-block btn-xs btn-block">取消授权</g:link>
                                    </sec:ifAllGranted>
                                </td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>

    </div>
</div>
</body>
</html>
